package com.guozcc.bootweb;


import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ImportResource;


//@ServletComponentScan//使用servlet过滤器时需要  过滤器类若上加@Component，此处则不需要开启扫描，否则重复执行
@SpringBootApplication
@ImportResource("classpath:springconfig/**/*.xml")//指定SpringXml配置文件扫描路径
@EnableCaching  //开启SpringBoot缓存
public class BootwebApplication {

    public static void main(String[] args) throws Exception {
        //String traceId = "Started_"+ UUID.randomUUID().toString().replace("-","");
        //MDC.put("traceId", traceId);
        ConfigurableApplicationContext configurableApplicationContext = SpringApplication.run(BootwebApplication.class, args);
    }
}
